<div id='titleHead'>	
	<h1><%= @place.name || @place.id %></h1>
</div>
<div class='documentation'>		
Here an detailed overview over the place is given.
You can see the tokens lying on the place. Additionally you got the ability to add a new token using the form below.
</div>
<div class='container'>
	<h3>Tokens</h3>
		<% @place.tokens.each do |token| %>
			<div class='innerContainer'>
				<div>
					<%= "Token #{token.id} is case #{token.case.id}" %>
					<a href="javascript:toggleEditTokenField('<%=token.id%>')">
						<%=image_tag("famfamfam/pencil.png", :border => "0", :alt => "Save")%>
					</a>
					<a style="display:none" id="save_token_<%=token.id%>" href="javascript:saveToken('<%=token.id%>')">
						<%=image_tag("famfamfam/disk.png", :border => "0", :alt => "Save")%>
					</a>
					<a href="javascript:deleteToken('<%= url(:place_token, :place_id => @place, :id => token) %>')"><%= image_tag('delete.png', :border => "0", :alt => "Delete")%></a>
					<pre id="show_token_<%=token.id%>" style="border: 1px solid black;" ><![CDATA[<%= token.value %>]]></pre>
					<form style="display:none" id="edit_token_<%=token.id%>" action="<%= url(:place_token, :place_id => @place.id, :id => token.id) %>">
						<textarea name="token[value]"><![CDATA[<%= token.value %>]]></textarea>
					</form>
				</div>
			</div>
		<% end %>
</div>
<div class='container'>
<h3>Add new token</h3>
<form action="<%= url(:place_tokens, :place_id => @place.id) %>" method="post">
	<textarea name="token_to_add"></textarea>
	<input value="Add Token" type="submit"/>
</form>
</div>